//消息通知表
var mongoose = require("../mongoose")

//创建产品Schema
var schema = new mongoose.Schema({
    id: { type: String, require: true },//消息id
    byUserId: { type: String, require: true },//需要通知的用户id
    otherUserId: { type: String, require: true },//发通知的用户id
    otherUserName: { type: String, require: true },//发通知的用户名
    otherUserImg: { type: String, require: true },//发通知的用户头像
    give: { type: Object, require: true },//点赞的数据对象
    dynamic: { type: Object, require: true },//评论的数据对象
    dynamicContent: { type: String, require: true },//评论内容
    isDynamic: { type: Number, require: true },//评论是否已读 0 否 1是
    isGive: { type: Number, require: true },//点赞是否已读 0 否 1是
    date: { type: String, require: true },//时间

});
// 定义MongoDB数据模型 (表>=集合)
module.exports = mongoose.model("messagelists", schema);